#include <iostream>
#include <string>
#include <cstdio>

using namespace std;

class my_class
{
private:
    FILE * fp;
public:
    void operator()(const char * file_name , const char * mode)
    {
        this->fp = fopen(file_name , mode);
        if (NULL == fp)
        {
            cout << "文件打开始失败" << endl;
            return ;
        }

        cout << "文件打开始成功" << endl;
        fclose(this->fp);
        return ;
    }
};






int main(int argc, char const *argv[])
{
    
    my_class file;
    file("hqyj.txt" , "r+");
    return 0;
}
